<%-- 
    Document   : fetchmangalistfromserver
    Created on : 21 juil. 2013, 12:51:12
    Author     : dorian
--%>

<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Fetch Manga List From Server</title>
  </head>
  <body>
    <%
      int mangaCount = (Integer) request.getAttribute("mangaCount");
      List<String> mangaTitles = (List<String>) request.getAttribute("mangaTitles");
    %>
    <div id="results">
      <h1>successfully fetched <%= mangaCount%> titles from Manga Eden servers:</h1>
      <p>
        <%
          for (Iterator<String> it = mangaTitles.iterator(); it.hasNext();) {
            String mangaTitle = it.next();
        %>
        <%= mangaTitle %>
        <%
            if(it.hasNext()) {
              %>
              ,
              <%
            }
          }
        %>
      </p>
    </div>
  </body>
</html>
